﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using System.ComponentModel.DataAnnotations;

namespace Upreader.Application.Model
{
    /// <summary>
    /// Represents a download specific to Upreader taking on NZB characteristics
    /// </summary>
    public class Download : ModelBase
    {
        #region Properties

        /// <summary>
        /// Get or set the title for this operation. This is purely for visual representation
        /// </summary>
        [Required(AllowEmptyStrings = false)]
        public string Title { get; set; }

        /// <summary>
        /// Get or set wether this download should be automatically repaired when required;
        /// </summary>
        public bool IsRepairEnabled { get; set; }

        /// <summary>
        /// Get or set wether this download should be automatically extracted when required
        /// </summary>
        public bool IsExtractEnabled { get; set; }

        /// <summary>
        /// Get or set wether the current operation is paused or not
        /// </summary>
        public bool IsPaused { get; set; }

        /// <summary>
        /// Get or set the moment in time when this download was inserted
        /// </summary>
        public DateTime Inserted { get; set; }

        /// <summary>
        /// Get or set the moment in time when this download was posed 
        /// </summary>
        public DateTime Posted { get; set; }

        /// <summary>
        /// Get or set the state of the current download
        /// </summary>
        public DownloadState State { get; set; }

        /// <summary>
        /// Get or set the priority of the file
        /// </summary>
        public int Priority { get; set; }

        /// <summary>
        /// Get the path of the destination folder where this download should be written
        /// </summary>
        public string DownloadPath { get; set; }

        #endregion // Properties
    }
}
